]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ci: Look for matching ref in user remote for branch pipeline
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 1 Jul 2023 18:25:52 +0000 (20:25 +0200)
committerMarge Bot <marge-bot@gnome.org>
Fri, 7 Jul 2023 17:28:26 +0000 (17:28 +0000)
We currently only find a matching ref on the same remote in
a merge request pipeline, but not in branch pipelines.

It can occasionally be useful to run a pipeline without opening
a merge request, so try the same remote here as well instead of
just assuming origin.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2814>

.gitlab-ci/checkout-mutter.sh

index 765e39dccd7145b4038019ceda14eb58c4818b4c..76375fdbfc5447103549de6ff074224c34cd058d 100755 (executable)
@@ -41,8 +41,9 @@ if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then
 fi
 
 if [ -z "$mutter_target" ]; then
+  ref_remote=${CI_PROJECT_URL//gnome-shell/mutter}
   echo -n Looking for $CI_COMMIT_REF_NAME on remote ...
-  if fetch origin $CI_COMMIT_REF_NAME; then
+  if fetch $ref_remote $CI_COMMIT_REF_NAME; then
     echo \ found
     mutter_target=FETCH_HEAD
   else